"""create_init_currency_data

Revision ID: f2fa07398e50
Revises: 29bab680f182
Create Date: 2017-03-05 16:29:53.959995

"""

# revision identifiers, used by Alembic.
revision = 'f2fa07398e50'
down_revision = '29bab680f182'

import sqlalchemy as sa
from alembic import op


# Currency.get_or_create(id='USD', defaults={'id': 'USD',
#                                            'screen_name': 'United States Dollar',
#                                            'type': 'main',
#                                            'prefix': '$',
#                                            'rate': 1
#                                            })
# Currency.get_or_create(id='CNY', defaults={
#     'id': 'CNY',
#     'screen_name': 'CNY',
#     'prefix': '￥',
#     'rate': 6.63
# })
def upgrade():
    pass
    ### commands auto generated by Alembic - please adjust! ###
    # us = Currency(
    #     id='USD',
    #     screen_name='U.S Dollar',
    #     prefix='$',
    #     rate=1,
    #     type='main',
    #     logo='http://oc3dkgv4l.bkt.clouddn.com/countries/United-States-of-America.png',
    # )
    # db.session.add(us)
    #
    # cny = Currency(
    #     id='CNY',
    #     screen_name='CNY',
    #     prefix='￥',
    #     rate=6.63,
    #     logo='http://oc3dkgv4l.bkt.clouddn.com/countries/China.png',
    # )
    # db.session.add(cny)
    # db.session.commit()

    ### end Alembic commands ###


def downgrade():
    sa.deleteTable('currency')
